package com.sixth.exceptionhandler;

import com.sixth.bean.common.BaseRespVo;
import org.apache.shiro.authc.LockedAccountException;
import org.apache.shiro.authc.UnknownAccountException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName LockedAccountExceptionAdvice
 * @Description TODO
 * @Author XiaoWJ
 * @Date 2022/9/12 21:48
 **/
@RestControllerAdvice
public class LockedAccountExceptionAdvice {

    @ExceptionHandler(LockedAccountException.class)
    public BaseRespVo lockedAccountExceptionResolve (LockedAccountException exception) {

        return BaseRespVo.invalidData("此账号已禁用，请联系管理员！");

    }

}
